<template>
  <div id="listViewBottom">
      <div class="listview_middle">
        <span class="iconfont icon-24gf-playCircle"></span>
        <span>播放全部 ({{playlist.tracks.length}})</span>
        <span class="iconfont icon-xiazai"></span>
        <span class="iconfont icon-duigou"></span>
    </div>
      <div class="listview_bottom" v-for="(item,index) in playlist.tracks" :key='index' @click="play(index)">
          <div>{{index+1}}</div>
          <div>
              <p>{{item.name}}</p>
              <p>{{item.al.name}}</p>
          </div>
          <div class="iconfont icon-bofang"></div>
          <div class="iconfont icon-gengduo-shuxiang"></div>
      </div>


  </div>
</template>

<script type="text/javascript">
export default {
  name: "ListViewBottom",
  data() {
    return {
        
    }
  },
  props:{
      playlist: {
            type: Object
        }
  },
  components: {
  },
  methods:{
	  play(index){
		  // console.log("播放"+index);
		  this.$store.commit("setPlayIndex",index);
	  }
  }
}
</script>

<style lang="less" scoped>
#listViewBottom{
    margin-top: 1.5rem;
    z-index: 99;
    background-color: #fff;
}
.listview_middle {
    background-color: #fff;
    height: .8rem;
    display: flex;
    justify-content: left;
    align-items: center;
    box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.5);
    //水平阴影位置，垂直阴影位置，模糊距离， 阴影尺寸，阴影颜色
    span {
        padding-left: .2rem;

        &:nth-of-type(1) {
            color: red;
        }

        &:nth-of-type(2) {
            flex: 1;
        }

        &:nth-of-type(3) {
            font-weight: 500;
        }

        &:nth-of-type(4) {
            padding-right: .3rem;
            font-size: .4rem;
            color: rgba(12, 12, 12, .7);
        }
    }
}
.listview_bottom{
    background-color: #fff;
    height: 1.15rem;
    display: flex;
    justify-content: left;
    align-items: center;
    box-sizing: border-box;
    >div{
        padding-left: .2rem;
        &:nth-of-type(1){
            width: .7rem;
            text-align: center;
        }
        &:nth-of-type(2){
            flex: 1;
            p{
                &:nth-of-type(1){
                    width: 5rem;
                    font-weight: 500;
                    font-size: .35rem;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }
                &:nth-of-type(2){
                    width: 5rem;
                    font-size: .3rem;
                    color: #999;
                    padding-top: .1rem;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: inherit;
                }
            }
        }
        &:nth-of-type(3){
           
        }
        &:nth-of-type(4){
            padding-right: .2rem;
        }
    }
}
</style>
